package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.QueryComponent;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.type.JdbcType;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/QueryComponentMapper.class */
public interface QueryComponentMapper {
    @Select({"<script>", "select * from query_component " +
            "<where> " +
            "<if test='classify != null and classify.length &gt; 0 '>" +
            "classify = #{classify,jdbcType=VARCHAR} " +
            "</if>" +
            "<if test='componentShow != null '>" +
            "and component_show = #{componentShow,jdbcType=INTEGER} " +
            "</if>" +
            "</where> " +
            "order by sort asc" +
            "</script>"})
    @Results({@Result(column = "component_name", property = "componentName", jdbcType = JdbcType.VARCHAR), @Result(column = "component_key", property = "componentKey", jdbcType = JdbcType.VARCHAR), @Result(column = "component_type", property = "componentType", jdbcType = JdbcType.VARCHAR), @Result(column = "option_url", property = "optionUrl", jdbcType = JdbcType.VARCHAR), @Result(column = "option_key", property = "optionKey", jdbcType = JdbcType.VARCHAR), @Result(column = "component_show", property = "componentShow", jdbcType = JdbcType.INTEGER), @Result(column = "auto_data", property = "autoData", jdbcType = JdbcType.INTEGER), @Result(column = "default_params", property = "defaultParams", jdbcType = JdbcType.INTEGER)})
    List<QueryComponent> findAll(@Param("classify") String str, @Param("componentShow") Integer num);

    @Update({"update  query_component  set sort = #{sort},component_show = #{componentShow} where id = #{id}"})
    Integer update(@Param("sort") Integer num, @Param("componentShow") Integer num2, @Param("id") Integer num3);
}